-- CALC_SHIP_LEVEL

-- 计算幽灵船等级
-- @param ship    幽灵船
return function(ship, fix)
    local add = 0;

    if ship:isHired() then
        add = ME.user.dbase:query("ship_level", 0);
    end

    local level = ship.level + add;

    local max_level = GhostShipM.query(ship.classId, "max_level");

    return math.min(level, max_level);
end
